package yuan.deng.controller;


import yuan.deng.domain.UserInfo;
import yuan.deng.service.UserService;
import yuan.deng.service.impl.UserServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@WebServlet("/user/login")
public class UserServlet extends HttpServlet {
    UserService userService =new UserServiceImpl();
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        System.out.println(1); /*req.setCharacterEncoding("utf-8");
        resp.setContentType("text/html,charset=utf-8");
        String username = req.getParameter("username");
        String password = req.getParameter("password");
        UserInfo u=new UserInfo();
        u.setUsername(username);
        u.setPassword(password);
        UserInfo user=userService.login(u);
        System.out.println(user);*/
    }
}
